<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:p="http://primefaces.prime.com.tr/ui"
                template="/templates/ui.xhtml">

    <ui:define name="head">
        <style type="text/css">
            .col-label {
                width: 110px;
                text-align: right;
            }

            .col-label2 {
                padding-left: 80px;
                width: 110px;
                text-align: right;
            }

            .col-input {
                width: 120px;
            }

            .col-qry1 {
                width: 40%;
            }
        </style>
        <script language="JavaScript" type="text/JavaScript">
            /*document.onkeydown = function TabReplace() {
                if (event.keyCode == 13) {
                    if (event.srcElement.id == 'editForm:printid'){
                        document.getElementById("editForm:btnAccept").click();
                    }
                }
            }*/
            $=jQuery;
            $(document).ready(function() {
                $('#editForm\\:printid').focus(function() {
                    $('#editForm\\:printid').select();
                });
            });
        </script>
    </ui:define>

    <ui:define name="content">
        <div style="margin:5px 15px 5px 15px">
            <p:growl id="msgs" showDetail="false"/>
            <h:form id="editForm">
                <p:focus for="printid"/>
                <p:panel header="获取数据">
                    <h:panelGrid width="100%" cellspacing="0" border="0" columns="2" columnClasses="col-qry1">
                        <h:panelGroup>
                            <h:panelGrid cellspacing="0" border="0" columns="3">
                                <h:outputLabel value="凭证编号:"/>
                                <h:inputText id="printid" autocomplete="off" required="true" requiredMessage="请输入凭证号"
                                            style="width:200px" value="#{payProcessAction.printid}"/>
                                <h:message for="printid" style="color:red;"/>
                            </h:panelGrid>
                        </h:panelGroup>
                        <h:panelGrid cellspacing="0" border="0" columns="1"
                                     width="100%">
                            <h:panelGroup>
                                <p:commandButton style="width:60px;" ajax="false"
                                                 action="#{payProcessAction.onBtnAcceptClick}"
                                                 id="btnAccept"
                                                 value="获 取"></p:commandButton>
                                <p:spacer width="10px"/>
                                <p:commandButton style="width:60px;" type="reset" value="重 置"></p:commandButton>
                            </h:panelGroup>
                        </h:panelGrid>
                    </h:panelGrid>
                </p:panel>
                <p:fieldset legend="凭证信息">
                    <ui:include src="common/payVoucherForm.xhtml">
                        <ui:param name="backBean" value="#{payProcessAction}"/>
                    </ui:include>
                </p:fieldset>
                <p:fieldset legend="操作">
                    <h:panelGrid columns="1" cellpadding="2" border="0" style="width:700px;text-align:center;">
                        <h:panelGroup>
                            <h:commandButton id="btnPay"
                                             ajax="true" value="支付成功"
                                             action="#{payProcessAction.btnPayClick}"
                                             style="width:90px">
                            </h:commandButton>
                            <p:spacer width="10px"/>
                            <h:commandButton id="btnRefuse" ajax="true" value="退票"
                                             action="#{payProcessAction.btnRefuseClick}"
                                             style="width:90px">
                            </h:commandButton>
                        </h:panelGroup>
                    </h:panelGrid>
                </p:fieldset>
            </h:form>
        </div>
    </ui:define>

</ui:composition>